package cn.com.huzo.model.entities.tech;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 产品成本预测主记录实体类
 *
 * @author 范学春
 */
public class CostForecastHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 852740968602225877L;
    private Long HeaderId;
    private String BillNo;                    // 单据号
    private String StyleNo;                   // 产品款号
    private String ProductName;               // 产品名称
    private String CustomerName;              // 客户名称
    private Integer PerColourQuantity;        // 每色数量
    private Integer TotalQuantity;            // 合同总量
    private Double TotalUnitCost2Amount;      // 单位材料成本总计
    private Integer DesignedBy;               // 设计者
    private String DesignedByName;
    private Boolean LastFlag;                 // 是否最终预测
    private Short BillFlag;                   // 标记 0：快速报价 1：准确报价
    private String Description;               // 备注
    private Long BomHeaderId;                 // 使用选择的BOM（单耗）
    private String BomDescription;            // 单耗表说明

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getBillNo() {
        return BillNo;
    }

    public void setBillNo(String BillNo) {
        this.BillNo = BillNo;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public Integer getPerColourQuantity() {
        return PerColourQuantity;
    }

    public void setPerColourQuantity(Integer PerColourQuantity) {
        this.PerColourQuantity = PerColourQuantity;
    }

    public Integer getTotalQuantity() {
        return TotalQuantity;
    }

    public void setTotalQuantity(Integer TotalQuantity) {
        this.TotalQuantity = TotalQuantity;
    }

    public Double getTotalUnitCost2Amount() {
        return TotalUnitCost2Amount;
    }

    public void setTotalUnitCost2Amount(Double TotalUnitCost2Amount) {
        this.TotalUnitCost2Amount = TotalUnitCost2Amount;
    }

    public Integer getDesignedBy() {
        return DesignedBy;
    }

    public void setDesignedBy(Integer DesignedBy) {
        this.DesignedBy = DesignedBy;
    }

    public String getDesignedByName() {
        return DesignedByName;
    }

    public void setDesignedByName(String DesignedByName) {
        this.DesignedByName = DesignedByName;
    }

    public Boolean getLastFlag() {
        return LastFlag;
    }

    public void setLastFlag(Boolean LastFlag) {
        this.LastFlag = LastFlag;
    }

    public Short getBillFlag() {
        return BillFlag;
    }

    public void setBillFlag(Short BillFlag) {
        this.BillFlag = BillFlag;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Long getBomHeaderId() {
        return BomHeaderId;
    }

    public void setBomHeaderId(Long BomHeaderId) {
        this.BomHeaderId = BomHeaderId;
    }

    public String getBomDescription() {
        return BomDescription;
    }

    public void setBomDescription(String BomDescription) {
        this.BomDescription = BomDescription;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof CostForecastHeaderEntity)) {
            return false;
        }

        final CostForecastHeaderEntity that = (CostForecastHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
